<%--
  Created by IntelliJ IDEA.
  User: RE1UY
  Date: 2021/10/15
  Time: 12:41
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>交易创建成功</title>
    <script src="/reiCode/js/jquery-3.5.1.js" type="text/javascript"></script>
    <script>
        function paybutton(transactionid) {
            if(confirm("您确定要进行支付吗")){
                window.location.href = "${pageContext.request.contextPath}/transaction/pay.do?transactionid="+transactionid
            }
        }
    </script>

</head>
<body>
<table align="center">
    <tr>
        <th>交易id</th>
        <th>交易时间</th>
        <th>商品名</th>
        <th>商品单价</th>
        <th>商品简介</th>
        <th>商家</th>
        <th>数量</th>
        <th>总价</th>
        <th>状态</th>
    </tr>
    <tr>
        <td><c:out value="${transactioninfo.transactionid}"></c:out></td>
        <td><c:out value="${transactioninfo.transactiontime}"></c:out></td>
        <td><c:out value="${transactioninfo.goodname}"></c:out></td>
        <td><c:out value="${transactioninfo.goodprice}"></c:out></td>
        <td><c:out value="${transactioninfo.goodintro}"></c:out></td>
        <td><c:out value="${transactioninfo.username}"></c:out></td>
        <td><c:out value="${transactioninfo.quantity}"></c:out></td>
        <td><c:out value="${transactioninfo.totalprice}"></c:out></td>
        <td><c:out value="${transactioninfo.transactionstate}"></c:out></td>
    </tr>
</table>
<p align="center">${tips}</p>
<p align="center">您的余额还有${balance}</p>
<div align="center">
    <input type="button" value="立即支付" onclick="paybutton(${transactioninfo.transactionid})">
</div>


</body>
</html>
